﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;
using YAPL.Util;

namespace YAPL.Test.YAPL.Util {
	public class RequireTest {
		[Fact]
		public void NotNullValueShouldNotThrowException() {
			var test = new {TestValue = "Test value"};
			Require.NotNull(test);
			Assert.Equal(test.TestValue, "Test value");
		}
		[Fact]
		public void NullShouldThrowArgumentNullException() {
			Assert.Throws<ArgumentNullException>(() => Require.NotNull(null));
		}
		[Fact]
		public void EmptyShouldThrowArgumentException() {
			Assert.Throws<ArgumentException>(() => Require.NotEmpty(""));
		}
	}
}